<?php
//include("../include/function.php");
dbconnect();
session_start();
?>
<?php
if($_SESSION["loggedin"]==true && $_SESSION["role"]==admin)
{
if(isset($_SESSION[msg]))
{
echo $_SESSION[msg];
unset($_SESSION[msg]);
}
?>
<?php 
$id = $_GET['id'];
$select = "SELECT * FROM  client WHERE clientid='$id'";
$edit = mysql_query($select);
$editclient = mysql_fetch_array($edit);

?>
<form action="index.php?management=client&&task=edit&&id=<?php echo $row[clientid]; ?>" method="post">
<input type="hidden" value="<?php echo "$editclient[clientid]";?> " name="id" />
<input type="text" value="<?php echo "$editclient[clientname]";?>" name="clientname"/>
<input type="submit" name="editclient" value="save"/>
</form>

<?php
if(isset($_POST['editclient']))
{
$id = $_POST['id'];

$updatevalue = array();
$updatevalue[clientname]= $clientname;

$update = updatequery("client",$updatevalue,"clientid",$id);


/* $update ="UPDATE client SET clientname='$clientname' WHERE clientid='$id'";
$ued = mysql_query($update); */
header("Location: index.php?management=client");
}

}
else
{
header("Location: login.php");
}
?>